package cn.cqie.attendance.student.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;


@Data
@Accessors(chain = true)
@ApiModel(value = "leaves" )
@Alias("leaves")
@NoArgsConstructor
@AllArgsConstructor
public class Leaves implements Serializable {

    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 请假主题 */
    @ApiModelProperty(value = "请假主题")
    private String leaveTheme;

    /** 1 事假 0 病假 2 其他 */
    @ApiModelProperty(value = "1 事假 0 病假 2 其他")
    private int leaveReason;

    /** 请假说明 */
    @ApiModelProperty(value = "请假说明")
    private String reasonDetail;

    /** 请假学生 */
    @ApiModelProperty(value = "请假学生")
    private Long stuId;

    /** 0 审批不通过 1 审批中 2 审批通过 */
    @ApiModelProperty(value = "0 审批不通过 1 审批中 2 审批通过")
    private int leaveStatus;

    /** 开始时间 */
    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 申请时间 */
    @ApiModelProperty(value = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    /** 课程 */
    @ApiModelProperty(value = "课程")
    private Long courseId;

    /** 审批时间 */
    @ApiModelProperty(value = "审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date transitTime;

    private LeaveLog leaveLog;
    private Attachment attachment;


}
